<?php
/**
 * Created by PhpStorm.
 * User: vinhtd
 * Date: 3/19/14
 * Time: 5:54 PM
 */

function shuffle_assoc(&$array) {
    $keys = array_keys($array);
    shuffle($keys);
    foreach($keys as $key => $new_key) {
        $new[$key] = $array[$new_key];
    }
    $array = $new;
    return true;
}